#include <bits/stdc++.h>
using namespace std;
const int N=150;
int g[N][N];
int n,m,k;
int uN,vN;
int link[N];
bool used[N];
bool dfs(int u){
    for(int v=1;v<=vN;v++){
        if(g[u][v] && !used[v]){
            used[v]=true;
            if(link[v]==-1 || dfs(link[v])){
                link[v]=u;
                return true;
            }
        }
    }
    return false;
}
int hungary(){
    int res=0;
    memset(link,-1,sizeof(link));
    for(int u=1;u<=uN;u++){
        memset(used,false,sizeof(used));
        if(dfs(u)){
            res++;
        }
    }
    return res;
}
int x[10050],y[10050];
int main(void){
    int c=1;
    while(~scanf("%d%d%d",&n,&m,&k)){
        memset(g,0,sizeof(g));
        uN=n;
        vN=m;
        for(int i=0;i<k;i++){
            scanf("%d%d",&x[i],&y[i]);
            if(!g[x[i]][y[i]]){
                g[x[i]][y[i]]=1;
            }
        }
        int s=hungary();
        int ans=0;
        for(int i=0;i<k;i++){
            g[x[i]][y[i]]=0;
            int ss=hungary();
            if(ss<s){
                //重要点
                ans++;
            }
            g[x[i]][y[i]]=1;
        }
        printf("Board %d have %d important blanks for %d chessmen.\n",c++,ans,s);
    }
    return 0;
}